package com.alex.designPattern.factory.factoryMethod;

import com.alex.designPattern.IDao;

public class Client {
	
	/**
	 * 通过创建不同的工厂，来实现不同产品的创建
	 * @param args
	 */
	public static void main(String[] args) {
		IDao dao;
		Object result;
		
		dao = new JDBCDaoFactory().createDao();
		
//		dao = new IbatitsDaoFactory().createDao();
		
//		dao = new HibernateDaoFactory().createDao();
		
		result = dao.getById();
		
		System.out.println(result);
	}

}
